package com.spark.Service.impl;


import com.spark.Service.AccountService;
import com.spark.mapper.AccountMapper;
import com.spark.mapper.DiaryMapper;
import com.spark.pojo.Account;
import com.spark.pojo.Diary;
import com.spark.pojo.RelationTagDiary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;
    @Autowired
    private DiaryMapper diaryMapper;

    @Override
    public List<Account> queryAccountList() throws Exception {
        List<Account> accounts = accountMapper.queryAccountList();

        return accounts;
    }

    @Override
    public void saveText(Diary diary) {
        diaryMapper.saveText(diary);
    }

    @Override
    public void saveRelationTagDiary(RelationTagDiary relationTagDiary) {
        diaryMapper.saveRelationTagDiary(relationTagDiary);
    }


}
